package org.tigris.mappedlexer.validator.implementation;

/**
 * Checks if the input is white space.
 * 
 * @author zhisen.huang
 *
 */
public class SpaceValidator extends CompositeValidator {

	/**
	 * Get the next token with the constraints.
	 * 
	 * @param validators the constraints
	 */
	@Override
	public boolean validate(char chr) throws UnsupportedOperationException {
		// return chr == ' ' || chr == '\n' || chr == '\t'; || Character.isWhitespace(chr);
		return Character.isWhitespace(chr);
	}

}
